package com.bdqn.mapper.Enquire;

import com.bdqn.entity.Enquire;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EnquireMapper {
    /**
     * 添加Enquire
     */
    public boolean Insert(@Param("enq") Enquire enquire);

    /**
     * 编号对照表添加
     */
    public boolean UpdateIdMapping(@Param("id") int id,@Param("enq") Enquire enquire);

    /**
     * 查询Enquire
     */
    public Enquire Select(@Param("enq") Enquire enquire);

    /**
     * 分页并按条件查询
     * @param enquire
     * @param pageNum
     * @param pageSize
     * @return
     */
    public List<Enquire> findAll(@Param("enquire") Enquire enquire,@Param("pageNum")Integer pageNum,@Param("pageSize")Integer pageSize);

    /**
     * 查询总条数
     * @return
     */
    int getCount();

    /**
     * 根据序号删除一条询价记录
     * @param id
     * @return
     */
    int deleteEnquire(@Param("id") Integer id);


    /**
     * 修改Enquire
     */
    public boolean updateEnquire(@Param("enquire") Enquire enquire);

    public List<Enquire> findMateSupByEnq(@Param("id") Integer id);

    /**
     * 根据名称查
     */
    Enquire findByNum(@Param("enq") Enquire enquire);

    boolean UpdateStatus1(@Param("enq") Enquire enquire);
}
